diff -Nudr -U3 libmodplug-0.8.8.1.pre/src/fastmix.cpp libmodplug-0.8.8.1/src/fastmix.cpp
--- libmodplug-0.8.8.1.pre/src/fastmix.cpp	2010-06-27 21:34:29.876963827 +0100
+++ libmodplug-0.8.8.1/src/fastmix.cpp	2010-06-27 21:35:39.369214419 +0100
@@ -574,7 +574,7 @@
 typedef VOID (MPPASMCALL * LPMIXINTERFACE)(MODCHANNEL *, int *, int *);
 
 #define BEGIN_MIX_INTERFACE(func)\
-	VOID MPPASMCALL func(MODCHANNEL *pChannel, int *pbuffer, int *pbufmax)\
+	static VOID MPPASMCALL func(MODCHANNEL *pChannel, int *pbuffer, int *pbufmax)\
 	{\
 		LONG nPos;
 
@@ -665,8 +665,8 @@
 /////////////////////////////////////////////////////
 //
 
-void MPPASMCALL X86_InitMixBuffer(int *pBuffer, UINT nSamples);
-void MPPASMCALL X86_EndChannelOfs(MODCHANNEL *pChannel, int *pBuffer, UINT nSamples);
+static void MPPASMCALL X86_InitMixBuffer(int *pBuffer, UINT nSamples);
+static void MPPASMCALL X86_EndChannelOfs(MODCHANNEL *pChannel, int *pBuffer, UINT nSamples);
 void MPPASMCALL X86_StereoFill(int *pBuffer, UINT nSamples, LPLONG lpROfs, LPLONG lpLOfs);
 void X86_StereoMixToFloat(const int *, float *, float *, UINT nCount);
 void X86_FloatToStereoMix(const float *pIn1, const float *pIn2, int *pOut, UINT nCount);
@@ -800,6 +800,8 @@
 	SNDMIX_STOREFASTMONOVOL
 END_MIX_INTERFACE()
 
+#ifdef MODPLUG_DEADCODE
+
 BEGIN_MIX_INTERFACE(FastMono8BitSplineMix)
 	SNDMIX_BEGINSAMPLELOOP8
 	SNDMIX_GETMONOVOL8SPLINE
@@ -824,6 +826,7 @@
 	SNDMIX_STOREFASTMONOVOL
 END_MIX_INTERFACE()
 
+#endif // MODPLUG_DEADCODE
 
 // Fast Ramps
 BEGIN_FASTRAMPMIX_INTERFACE(FastMono8BitRampMix)
@@ -850,6 +853,8 @@
 	SNDMIX_RAMPFASTMONOVOL
 END_FASTRAMPMIX_INTERFACE()
 
+#ifdef MODPLUG_DEADCODE
+
 BEGIN_FASTRAMPMIX_INTERFACE(FastMono8BitSplineRampMix)
 	SNDMIX_BEGINSAMPLELOOP8
 	SNDMIX_GETMONOVOL8SPLINE
@@ -874,6 +879,7 @@
 	SNDMIX_RAMPFASTMONOVOL
 END_FASTRAMPMIX_INTERFACE()
 
+#endif // MODPLUG_DEADCODE
 
 //////////////////////////////////////////////////////
 // Stereo samples
@@ -1993,7 +1999,7 @@
 
 
 #ifdef MSC_VER
-void MPPASMCALL X86_InitMixBuffer(int *pBuffer, UINT nSamples)
+static void MPPASMCALL X86_InitMixBuffer(int *pBuffer, UINT nSamples)
 //------------------------------------------------------------
 {
 	_asm {
@@ -2027,7 +2033,7 @@
 #else
 //---GCCFIX: Asm replaced with C function
 // Will fill in later.
-void MPPASMCALL X86_InitMixBuffer(int *pBuffer, UINT nSamples)
+static void MPPASMCALL X86_InitMixBuffer(int *pBuffer, UINT nSamples)
 {
 	memset(pBuffer, 0, nSamples * sizeof(int));
 }
@@ -2218,7 +2224,7 @@
 #endif
 
 #ifdef MSC_VER
-void MPPASMCALL X86_EndChannelOfs(MODCHANNEL *pChannel, int *pBuffer, UINT nSamples)
+static void MPPASMCALL X86_EndChannelOfs(MODCHANNEL *pChannel, int *pBuffer, UINT nSamples)
 //------------------------------------------------------------------------------
 {
 	_asm {
@@ -2261,7 +2267,7 @@
 #else
 //---GCCFIX: Asm replaced with C function
 // Will fill in later.
-void MPPASMCALL X86_EndChannelOfs(MODCHANNEL *pChannel, int *pBuffer, UINT nSamples)
+static void MPPASMCALL X86_EndChannelOfs(MODCHANNEL *pChannel, int *pBuffer, UINT nSamples)
 {
 	int rofs = pChannel->nROfs;
 	int lofs = pChannel->nLOfs;
diff -Nudr -U3 libmodplug-0.8.8.1.pre/src/libmodplug/it_defs.h libmodplug-0.8.8.1/src/libmodplug/it_defs.h
--- libmodplug-0.8.8.1.pre/src/libmodplug/it_defs.h	2010-04-04 13:15:24.000000000 +0100
+++ libmodplug-0.8.8.1/src/libmodplug/it_defs.h	2010-06-27 21:35:39.385009443 +0100
@@ -128,7 +128,4 @@
 
 #pragma pack()
 
-extern BYTE autovibit2xm[8];
-extern BYTE autovibxm2it[8];
-
 #endif
diff -Nudr -U3 libmodplug-0.8.8.1.pre/src/libmodplug/stdafx.h libmodplug-0.8.8.1/src/libmodplug/stdafx.h
--- libmodplug-0.8.8.1.pre/src/libmodplug/stdafx.h	2010-04-04 13:15:24.000000000 +0100
+++ libmodplug-0.8.8.1/src/libmodplug/stdafx.h	2010-06-27 21:35:39.413165254 +0100
@@ -73,7 +73,7 @@
 typedef void* PVOID;
 typedef void VOID;
 
-inline LONG MulDiv (long a, long b, long c)
+static inline LONG MulDiv (long a, long b, long c)
 {
   // if (!c) return 0;
   return ((uint64_t) a * (uint64_t) b ) / c;
@@ -90,7 +90,7 @@
 
 #define  GHND   0
 
-inline int8_t * GlobalAllocPtr(unsigned int, size_t size)
+static inline int8_t * GlobalAllocPtr(unsigned int, size_t size)
 {
   int8_t * p = (int8_t *) malloc(size);
 
@@ -98,7 +98,7 @@
   return p;
 }
 
-inline void ProcessPlugins(int n) {}
+static inline void ProcessPlugins(int n) {}
 
 #define GlobalFreePtr(p) free((void *)(p))
 
diff -Nudr -U3 libmodplug-0.8.8.1.pre/src/load_amf.cpp libmodplug-0.8.8.1/src/load_amf.cpp
--- libmodplug-0.8.8.1.pre/src/load_amf.cpp	2010-04-04 13:15:24.000000000 +0100
+++ libmodplug-0.8.8.1/src/load_amf.cpp	2010-06-27 21:35:39.439140641 +0100
@@ -52,7 +52,7 @@
 extern void Log(LPCSTR, ...);
 #endif
 
-VOID AMF_Unpack(MODCOMMAND *pPat, const BYTE *pTrack, UINT nRows, UINT nChannels)
+static VOID AMF_Unpack(MODCOMMAND *pPat, const BYTE *pTrack, UINT nRows, UINT nChannels)
 //-------------------------------------------------------------------------------
 {
 	UINT lastinstr = 0;
diff -Nudr -U3 libmodplug-0.8.8.1.pre/src/load_it.cpp libmodplug-0.8.8.1/src/load_it.cpp
--- libmodplug-0.8.8.1.pre/src/load_it.cpp	2010-04-04 13:15:24.000000000 +0100
+++ libmodplug-0.8.8.1/src/load_it.cpp	2010-06-27 21:35:39.485963862 +0100
@@ -15,11 +15,13 @@
 #pragma warning(disable:4244)
 #endif
 
-BYTE autovibit2xm[8] =
+static BYTE autovibit2xm[8] =
 { 0, 3, 1, 4, 2, 0, 0, 0 };
 
-BYTE autovibxm2it[8] =
+#ifndef MODPLUG_NO_FILESAVE
+static BYTE autovibxm2it[8] =
 { 0, 2, 4, 1, 3, 0, 0, 0 };
+#endif
 
 //////////////////////////////////////////////////////////
 // Impulse Tracker IT file support
@@ -1180,7 +1182,7 @@
 //////////////////////////////////////////////////////////////////////////////
 // IT 2.14 compression
 
-DWORD ITReadBits(DWORD &bitbuf, UINT &bitnum, LPBYTE &ibuf, CHAR n)
+static DWORD ITReadBits(DWORD &bitbuf, UINT &bitnum, LPBYTE &ibuf, CHAR n)
 //-----------------------------------------------------------------
 {
 	DWORD retval = 0;
diff -Nudr -U3 libmodplug-0.8.8.1.pre/src/load_mod.cpp libmodplug-0.8.8.1/src/load_mod.cpp
--- libmodplug-0.8.8.1.pre/src/load_mod.cpp	2010-04-04 13:15:24.000000000 +0100
+++ libmodplug-0.8.8.1/src/load_mod.cpp	2010-06-27 21:35:39.525027504 +0100
@@ -168,7 +168,7 @@
 
 #pragma pack()
 
-BOOL IsMagic(LPCSTR s1, LPCSTR s2)
+static BOOL IsMagic(LPCSTR s1, LPCSTR s2)
 {
 	return ((*(DWORD *)s1) == (*(DWORD *)s2)) ? TRUE : FALSE;
 }
diff -Nudr -U3 libmodplug-0.8.8.1.pre/src/mmcmp.cpp libmodplug-0.8.8.1/src/mmcmp.cpp
--- libmodplug-0.8.8.1.pre/src/mmcmp.cpp	2010-04-04 13:15:24.000000000 +0100
+++ libmodplug-0.8.8.1/src/mmcmp.cpp	2010-06-27 21:35:39.553964080 +0100
@@ -7,7 +7,7 @@
 #include "stdafx.h"
 #include "sndfile.h"
 
-BOOL PP20_Unpack(LPCBYTE *ppMemFile, LPDWORD pdwMemLength);
+static BOOL PP20_Unpack(LPCBYTE *ppMemFile, LPDWORD pdwMemLength);
 
 typedef struct MMCMPFILEHEADER
 {
@@ -327,7 +327,7 @@
 }
 
 
-VOID PP20_DoUnpack(const BYTE *pSrc, UINT nSrcLen, BYTE *pDst, UINT nDstLen)
+static VOID PP20_DoUnpack(const BYTE *pSrc, UINT nSrcLen, BYTE *pDst, UINT nDstLen)
 {
 	PPBITBUFFER BitBuffer;
 	ULONG nBytesLeft;
@@ -382,7 +382,7 @@
 }
 
 
-BOOL PP20_Unpack(LPCBYTE *ppMemFile, LPDWORD pdwMemLength)
+static BOOL PP20_Unpack(LPCBYTE *ppMemFile, LPDWORD pdwMemLength)
 {
 	DWORD dwMemLength = *pdwMemLength;
 	LPCBYTE lpMemFile = *ppMemFile;
diff -Nudr -U3 libmodplug-0.8.8.1.pre/src/modplug.cpp libmodplug-0.8.8.1/src/modplug.cpp
--- libmodplug-0.8.8.1.pre/src/modplug.cpp	2010-04-10 13:33:30.000000000 +0100
+++ libmodplug-0.8.8.1/src/modplug.cpp	2010-06-27 21:35:39.571964669 +0100
@@ -15,7 +15,7 @@
 
 namespace ModPlug
 {
-	ModPlug_Settings gSettings =
+	static ModPlug_Settings gSettings =
 	{
 		MODPLUG_ENABLE_OVERSAMPLING | MODPLUG_ENABLE_NOISE_REDUCTION,
 
@@ -35,9 +35,9 @@
 		0
 	};
 
-	int gSampleSize;
+	static int gSampleSize;
 
-	void UpdateSettings(bool updateBasicConfig)
+	static void UpdateSettings(bool updateBasicConfig)
 	{
 		if(gSettings.mFlags & MODPLUG_ENABLE_REVERB)
 		{
@@ -108,6 +108,8 @@
 	return file->mSoundFile.Read(buffer, size) * ModPlug::gSampleSize;
 }
 
+#ifdef MODPLUG_DEADCODE
+
 const char* ModPlug_GetName(ModPlugFile* file)
 {
 	return file->mSoundFile.GetTitle();
@@ -268,6 +270,8 @@
 	memcpy(settings, &ModPlug::gSettings, sizeof(ModPlug_Settings));
 }
 
+#endif // MODPLUG_DEADCODE
+
 void ModPlug_SetSettings(const ModPlug_Settings* settings)
 {
 	memcpy(&ModPlug::gSettings, settings, sizeof(ModPlug_Settings));
diff -Nudr -U3 libmodplug-0.8.8.1.pre/src/modplug.h libmodplug-0.8.8.1/src/modplug.h
--- libmodplug-0.8.8.1.pre/src/modplug.h	2010-04-04 13:40:03.000000000 +0100
+++ libmodplug-0.8.8.1/src/modplug.h	2010-06-27 21:35:39.616972672 +0100
@@ -37,22 +37,6 @@
  * of the mod has been reached, zero is returned. */
 int  ModPlug_Read(ModPlugFile* file, void* buffer, int size);
 
-/* Get the name of the mod.  The returned buffer is stored within the ModPlugFile
- * structure and will remain valid until you unload the file. */
-const char* ModPlug_GetName(ModPlugFile* file);
-
-/* Get the length of the mod, in milliseconds.  Note that this result is not always
- * accurate, especially in the case of mods with loops. */
-int ModPlug_GetLength(ModPlugFile* file);
-
-/* Seek to a particular position in the song.  Note that seeking and MODs don't mix very
- * well.  Some mods will be missing instruments for a short time after a seek, as ModPlug
- * does not scan the sequence backwards to find out which instruments were supposed to be
- * playing at that time.  (Doing so would be difficult and not very reliable.)  Also,
- * note that seeking is not very exact in some mods -- especially those for which
- * ModPlug_GetLength() does not report the full length. */
-void ModPlug_Seek(ModPlugFile* file, int millisecond);
-
 enum _ModPlug_Flags
 {
 	MODPLUG_ENABLE_OVERSAMPLING     = 1 << 0,  /* Enable oversampling (*highly* recommended) */
@@ -94,11 +78,30 @@
 	                        -1 loops forever. */
 } ModPlug_Settings;
 
+void ModPlug_SetSettings(const ModPlug_Settings* settings);
+
+#ifdef MODPLUG_DEADCODE
+
+/* Get the name of the mod.  The returned buffer is stored within the ModPlugFile
+ * structure and will remain valid until you unload the file. */
+const char* ModPlug_GetName(ModPlugFile* file);
+
+/* Get the length of the mod, in milliseconds.  Note that this result is not always
+ * accurate, especially in the case of mods with loops. */
+int ModPlug_GetLength(ModPlugFile* file);
+
+/* Seek to a particular position in the song.  Note that seeking and MODs don't mix very
+ * well.  Some mods will be missing instruments for a short time after a seek, as ModPlug
+ * does not scan the sequence backwards to find out which instruments were supposed to be
+ * playing at that time.  (Doing so would be difficult and not very reliable.)  Also,
+ * note that seeking is not very exact in some mods -- especially those for which
+ * ModPlug_GetLength() does not report the full length. */
+void ModPlug_Seek(ModPlugFile* file, int millisecond);
+
 /* Get and set the mod decoder settings.  All options, except for channels, bits-per-sample,
  * sampling rate, and loop count, will take effect immediately.  Those options which don't
  * take effect immediately will take effect the next time you load a mod. */
 void ModPlug_GetSettings(ModPlug_Settings* settings);
-void ModPlug_SetSettings(const ModPlug_Settings* settings);
 
 /* New ModPlug API Functions */
 /* NOTE: Master Volume (1-512) */
@@ -164,6 +167,8 @@
 void ModPlug_InitMixerCallback(ModPlugFile* file,ModPlugMixerProc proc) ;
 void ModPlug_UnloadMixerCallback(ModPlugFile* file) ;
 
+#endif // MODPLUG_DEADCODE
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
